home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / A-B / Astro2.cpt / Astrologer's Toolbox 2.2 / card_6150.txt < prev    next >
Text File  |  1990-12-13  |  32KB  |  1,287 lines

  1. -- card: 6150 from stack: in.2
  2. -- bmap block id: 3454
  3. -- flags: 0000
  4. -- background id: 2598
  5. -- name: Planets
  6. ----- HyperTalk script -----
  7. on calculate
  8.   Put "¬°‚Ñ¢¬£¬¢‚àû¬ß¬∂‚Ä¢¬™¬∫‚Äì‚àö‚à´" into planetSymbols
  9.   Put "‚àë¬Æ‚Ƭ•√∏œÄ‚Äú‚Äò√•√ü‚àÇΔí" into signSymbols
  10.   put "Aries,Taurus,Gemini,Cancer,Leo,Virgo,Libra,Scorpio," & "Sagittarius,Capricorn,Aquarius,Pisces" into signList
  11.  
  12.   set cursor to busy
  13.  
  14.   --  **************************************************************
  15.   --  **  Collecting the birthdata from the input fields  **********
  16.   --  **************************************************************
  17.  
  18.   Put card field monthNumber of card "Data entry"into monthNumber
  19.   Put card field dayNumber of card "Data entry" into dayNumber
  20.   Put card field yearNumber of card "Data entry" into yearNumber
  21.   Put card field hourNumber of card "Data entry" into hourNumber
  22.   Put card field minuteNumber of card "Data entry" into minuteNumber
  23.   --
  24.   If (hilite of card button "am" of card "Data entry") is true
  25.   then put "A" into amPM
  26. else put "P" into amPM
  27. --
  28. If (hilite of card button "Daylight Savings" of card "Data entry") is true
  29. then put "D" into timeType
  30. else put "S" into timeType
  31. --
  32. Put char 1 to 3 of card field "Longitude" of card "Data entry" into longitudeDegrees
  33. Put char 5 to 6 of card field "Longitude" of card "Data entry" into longitudeMinutes
  34. Put card field "Longitude" of card "Data entry" into longitude
  35.  
  36. if ("w" is in longitude) or ("W" is in longitude)
  37. then put "W" into eastWEST
  38. else put "E" into eastWEST
  39. --
  40. put card field zone of card "Data entry" into zone
  41. put char 1 to 2 of zone into ZoneHours
  42. put char 4 to 5 of zone into ZoneMinutes
  43. put ZoneHours + ZoneMinutes/60 into zone
  44. --
  45. set cursor to busy
  46. --
  47. Put char 1 to 2 of card field "Latitude" of card "Data entry" into latitudeDegrees
  48. Put char 4 to 5 of card field "Latitude" of card "Data entry" into latitudeMinutes
  49. Put card field "Latitude" of card "Data entry" into Latitude
  50. if "n" is in Latitude or "N" is in Latitude
  51. then put "N" into northSOUTH
  52. else put "S" into northSOUTH
  53. --
  54. set cursor to busy
  55.  
  56. --  ***********************************************************
  57. --  **  DAYS PAST 12H UT 31 DEC 1899  *************************
  58. --  ***********************************************************
  59.  
  60. Put daysPast( monthNumber,¬¨  -- 1..12
  61. dayNumber,¬¨  --  1..31
  62. yearNumber,¬¨  --  1800..2099
  63. hourNumber,¬¨  --  1..12
  64. minuteNumber,¬¨  --  0..59
  65. amPM,¬¨  --  "A" or "P"
  66. timeType,¬¨  --  "S"tandard or "D"aylight savings
  67. eastWEST,¬¨  --  "E" or "W"
  68. zone¬¨  -- 0.0..11.0
  69. ) into theDaysPast
  70.  
  71. --  Test for error message rather than number returned
  72. if not (char 1 of theDaysPast is in "0123456789") then
  73.   put theDaysPast  -- It's an error message, not proper output
  74.   exit calculate
  75. end if
  76. --
  77. set cursor to busy
  78.  
  79. --  ************************************************************
  80. --  **  CALCULATE PLANET POSITIONS  ****************************
  81. --  ************************************************************
  82.  
  83. --  The output of the function planets() is 11 "words" separated
  84. --  by a space.  Each word corresponds to a planet:
  85.  
  86. --  1 = Moon
  87. --  2 = Sun
  88. --  3 = Mercury
  89. --  4 = Venus
  90. --  5 = Mars
  91. --  6 = Jupiter
  92. --  7 = Saturn
  93. --  8 = Uranus
  94. --  9 = Neptune
  95. -- 10 = Pluto
  96. -- 11 = True North Node of the Moon
  97.  
  98. -- 12 = Ascendant (will be appended after house calculation)
  99. -- 13 = Midheavan (will be appended after house calculation)
  100.  
  101. -- Each planet "word" has 4 factors, separated by a comma so
  102. -- Hypertalk can refer to it as an "item"
  103.  
  104. -- 1) Planet longitude 0.000..359.999 [3 places after decimal)
  105. -- 2) Two digit string, degrees within a sign 00..29
  106. -- 3) One character sign symbol in Astrology font (stack resource)
  107. -- 4) Two digit string, minutes within sign 00..59
  108.  
  109. Put planets(theDaysPast) into planetStr
  110.  
  111. set cursor to busy
  112. --  Test for error message rather than number returned
  113. if not (char 1 of planetStr is in "0123456789") then
  114.   Put planetStr  -- It's an error message, not proper output
  115.   exit calculate
  116. end if
  117.  
  118. set cursor to busy
  119.  
  120. --  **********************************************************
  121. --  **  CALCULATE HOUSE CUSPS  *******************************
  122. --  **********************************************************
  123.  
  124. --  The output of the function houses() is 14 "words" separated
  125. --  by a space.  Each word corresponds to a cusp:
  126.  
  127. --  1..12 = Cusps, 13 = Midheaven, 14 = Vertex (not used)
  128.  
  129. -- Each house "word" has 4 factors, separated by a comma so
  130. -- Hypertalk can refer to it as an "item"
  131.  
  132. -- 1) Cusp longitude 0.000..359.999 [3 places after decimal)
  133. ----  For cusps 2..12 the longitude is the angular distance from
  134. ----  from the ascendant.  So, if you wanted the normal longitude
  135. ----  degrees of the 3rd house cusp, you would add the ascendant
  136. ----  (cusp 1) to the longitude output by the function Houses()
  137. ----  for the 3rd house cusp.  I designed the function this way to
  138. ----  make coding the house placement routine simpler.
  139. -- 2) Two digit string, degrees within a sign 00..29
  140. -- 3) One character sign symbol in Astrology font (stack resource)
  141. -- 4) Two digit string, minutes within sign 00..59
  142.  
  143. If (hilite of card button "Equal" of card "Data Entry") then
  144.   put "e" into houseSystem
  145. else if (hilite of card button "Placidus" of card "Data Entry") then
  146.   put "p" into houseSystem
  147. else if (hilite of card button "Koch" of card "Data Entry") then
  148.   put "k" into houseSystem
  149. end if
  150.  
  151. put houses( theDaysPast,¬¨  -- (1) -36525..40000
  152. longitudeDegrees,¬¨ -- (2) 0..179
  153. eastWEST,¬¨  -- (3) "E" or "W"
  154. longitudeMinutes,¬¨ -- (4) 0..59
  155. latitudeDegrees,¬¨  --  (5) 0..89
  156. northSOUTH,¬¨  --  (6) "N" or "S"
  157. latitudeMinutes,¬¨  --  (7)  0..59
  158. houseSystem)¬¨  -- (8) "E"qual "P"lacidus "K"och
  159. into cuspStr
  160.  
  161. set cursor to busy
  162.  
  163. --   Test for error message returned
  164. if not ("0123456789" contains character 1 of cuspStr) then
  165.   put cuspStr  -- it's an error message, not proper output
  166.   exit calculate
  167. end if
  168.  
  169. set cursor to busy
  170.  
  171. --  ******************************************************
  172. --  **  Planet Posting routine  **************************
  173. --  ******************************************************
  174.  
  175. Put planetStr && word 1 of cuspStr && word 13 of cuspStr into planetStr  --  Append Ascendant and Midheaven
  176.  
  177. repeat with planetNumber = 1 to 13
  178.  
  179.   --  Post full sign name  --
  180.  
  181.   Put item 1 of (word planetNumber of planetStr) into planetLong
  182.   put (trunc(planetLong) div 30) + 1 into signNumber
  183.   Put item signNumber of signList into line planetNumber of card field "Sign names"
  184.  
  185.   --  Post planet symbol  --
  186.  
  187.   Put character planetNumber of planetSymbols into line planetNumber of card field "Planet Symbols"
  188.  
  189.   --  Post DDsignMM  --
  190.  
  191.   Put item 2 of (word planetNumber of planetStr) into dd
  192.   Put item 3 of (word planetNumber of planetStr) into signSymbol
  193.   Put item 4 of (word planetNumber of planetStr) into mm
  194.   Put dd & signSymbol & mm into line planetNumber of card field "Planet DDsignMM"
  195.   set cursor to busy
  196. end repeat
  197.  
  198. --  *********************************************************
  199. --  **  Creating table of slot longitudes for all houses  ***
  200. --  **  "cuspSlotTable".  The planet data will be placed  ***
  201. --  **  in another variable "planetsBySlot"               ***
  202. --  *********************************************************
  203.  
  204. Put cuspSlotTableMaker(cuspStr) into cuspSlotTable
  205. --+put cuspSlotTable into card field "cusp & slot Table"
  206.  
  207. --+if false then  -- test  ****
  208. --+Put item 1 of (word 1 of cuspStr) into ascendantLong
  209. --+Repeat with SlotNumber = 1 to 60
  210. --+Put (line SlotNumber of cuspSlotTable) + ascendantLong into slotLong
  211. --+If slotLong > 360 then subtract 360 from slotLong
  212. --+Get convertSlotsToHouseAndSlot(slotNumber)
  213. --+Put item 1 of it into houseNumber
  214. --+Put item 2 of it into slot
  215.  
  216. --+Put houseNumber & "," & slot & "," & slotLong --+& "," & degreesToSign(slotLong) into line slotNumber of var
  217. --+Put var into card field "cusp & slot table"
  218.  
  219. --+end repeat
  220.  
  221. --+end if -- test **
  222.  
  223. --  ************************************************************
  224. --  **  Fill variable "planetsbySlot" with planet symbol and  **
  225. --  **  ddSignMM using "cuspSlotTable"                        **
  226. --  ************************************************************
  227.  
  228. Put item 1 of (word 1 of cuspStr) into ascendantLong
  229. Put empty into planetsBySlot
  230. if (hilite of card button "Equal" of card "Data Entry")
  231. then Put 12 into upper else put 11 into upper
  232.  
  233. Repeat with index = 1 to upper
  234.   set cursor to busy
  235.   Put item index of "1,2,3,4,5,6,7,8,9,10,11,13" into planetNumber
  236.   Put item 1 of (word planetNumber of PlanetStr) into planetLongA
  237.   Subtract ascendantLong from planetLongA  -- Cusps relative to ASC
  238.   If planetLongA < 0 then Add 360 to planetLongA
  239.   Put initialSlotNumber(cuspSlotTable,planetLongA) into slotNumber
  240.  
  241.   --  Filling house field  --
  242.  
  243.   Get convertSlotsToHouseAndSlot(slotNumber)
  244.   Put item 1 of it into houseNumber
  245.   Put houseNumber into line planetNumber of card field "House"
  246.  
  247.   --  **************************************************
  248.   --  **  Inserting newPlanetData into planetsBySlot  **
  249.   --  **************************************************
  250.  
  251.   Put character planetNumber of planetsymbols & "," & word planetNumber of planetStr into newPlanetData
  252.  
  253.  
  254.   If line slotNumber of planetsBySlot is empty then
  255.     put newPlanetData into line slotNumber of planetsBySlot
  256.  
  257.   else  --  slot already filled with planet data
  258.  
  259.     Put item 2 of newPlanetData into newLong
  260.     Put item 2 of (line slotNumber of planetsBySlot) into oldLong
  261.  
  262.     Put item 2 of convertSlotsToHouseAndSlot(slotNumber) into initialSlotOfHouse
  263.     Put slotNumber - initialSlotOfHouse + 1 into lowestSlot
  264.     Put slotNumber + 5 - initialSlotOfHouse into highestSlot
  265.     If newLong >= oldLong then
  266.       Put insertNewGreaterThanEqualOld( newPlanetData, slotNumber, lowestSlot, highestSlot, planetsBySlot) into planetsBySlot
  267.  
  268.     else If newLong < oldLong then
  269.  
  270.       Put insertNewLessThanOld( newPlanetData, slotNumber, lowestSlot, highestSlot, planetsBySlot) into planetsBySlot
  271.  
  272.     end if
  273.   end if
  274.   set cursor to busy
  275. end repeat
  276.  
  277. --  ****************************************
  278. --  **  A S P E C T S  *********************
  279. --  ****************************************
  280.  
  281. Get aspects(planetStr)
  282.  
  283. lock screen
  284. go to card "Horoscope"
  285. Choose select tool
  286. doMenu "select all"
  287. doMenu "cut picture"
  288. Unlock screen with barn door close
  289.  
  290. Get makeHoroscope(planetsBySlot, cuspStr)
  291.  
  292. If (highLight of card button "Turn off sound" of card "First") is false then
  293.   repeat for 3 times
  294.     play "twz"
  295.   end repeat
  296. end if
  297.  
  298. end calculate
  299.  
  300. --=================================================================
  301.  
  302. Function cuspSlotTableMaker cuspStr
  303. -- Returns longitude of all slots in all houses
  304.  
  305. Put 5 into slotsPerHouse
  306. Put item 1 of (word 1 of cuspStr) into ascendantLong
  307. Put 0 into lineNumber
  308.  
  309. Repeat with cuspNumber = 1 to 12  --------------------
  310.  
  311.   If cuspNumber > 1 then
  312.     put item 1 of (word cuspNumber of cuspStr) into cusp0
  313.   else
  314.     put 0 into cusp0
  315.   end if
  316.  
  317.   If (cuspNumber < 12) then
  318.     Put item 1 of (word cuspNumber + 1 of cuspStr) into cusp1
  319.   else
  320.     Put 360 into cusp1
  321.   end if
  322.  
  323.   Put cusp1 - cusp0 into delta
  324.  
  325.   Repeat with slotNumber = 1 to slotsPerHouse  -------------
  326.     Add 1 to lineNumber
  327.     Set cursor to busy
  328.  
  329.     Put cusp0 + (slotNumber-1) * delta/slotsPerHouse into slotLong
  330.     Put slotLong into line lineNumber of cuspSlotTable
  331.   end repeat -- slotNumber
  332. end repeat  -- cuspNumber
  333. return cuspSlotTable
  334. end cuspSlotTableMaker
  335.  
  336. --=================================================================
  337.  
  338. Function initialSlotNumber cuspSlotTable, planetLong -- 0..360
  339.  
  340. -- Returns the slot number for a given planet longitude
  341.  
  342. --  *******************
  343. --  **  First guess  **
  344. --  *******************
  345.  
  346. Put (the number of lines in cuspSlotTable) into totalSlots
  347. Put totalSlots div 12 into slotsPerHouse
  348.  
  349. If abs(planetLong-360) < 0.002 then put 0 into planetLong
  350. Put trunc(planetLong*totalSlots/360) + 1 into slotNumber0
  351.  
  352. --  ****************************************
  353. --  **  Get slot and following slot long  **
  354. --  ****************************************
  355.  
  356. Put line slotNumber0 of cuspSlotTable into slotLong0
  357. Put slotNumber0 + 1 into slotNumber1
  358.  
  359. If slotNumber1 <= totalslots then
  360.   Put line slotNumber1 of cuspSlotTable into slotLong1
  361. else
  362.   Put 360 into slotLong1
  363. end if
  364.  
  365. --  ***************************
  366. --  **  Slot number correct  **
  367. --  ***************************
  368.  
  369. If (planetLong >= slotLong0) and (planetLong < slotLong1) then
  370.   Return slotNumber0
  371.   Exit initialSlotNumber
  372. end if
  373.  
  374. --  **********************************************
  375. --  **  Slot number too high, move planet back  **
  376. --  **********************************************
  377.  
  378.  
  379. If planetLong < slotLong0 then
  380.   Repeat until planetLong >= slotLong0
  381.     Subtract 1 from slotNumber0
  382.     Put line slotNumber0 of cuspSlotTable into slotLong0
  383.   end repeat
  384.   Return slotNumber0
  385.   Exit initialSlotNumber
  386. end if
  387.  
  388. --  ************************************************
  389. --  **  Slot number too low, move planet forward  **
  390. --  ************************************************
  391.  
  392. If planetLong > slotLong1 then
  393.   Repeat until (planetLong < slotLong1) or (slotNumber0 = totalSlots)
  394.     Add 1 to slotNumber0
  395.     Put line slotNumber0 + 1 of cuspSlotTable into slotLong1
  396.   end repeat
  397.   Return slotNumber0
  398.   Exit initialSlotNumber
  399. end if
  400.  
  401. end initialSlotNumber
  402.  
  403. --==================================================================
  404.  
  405. Function insertNewLessThanOld newPlanetData,¬¨  -- planet_symbol,long,dd,sign_symbol,mm
  406. initialSlotNumber, lowestSlot,¬¨  -- within house 1..60
  407. highestSlot,¬¨  -- within house 1..60
  408. planetsBySlot -- variable with 60 lines
  409.  
  410. --  Returns planetsBySlot with new planet inserted and
  411. --  other planets rearranged if necessary
  412.  
  413. --  *****************************************************************
  414. --  **  Is previous slot empty, then put newPlanetData there ********
  415. --  *****************************************************************
  416.  
  417. If (initialSlotNumber > lowestSlot) then
  418.   if line initialSlotNumber - 1 of planetsbySlot is empty then
  419.     Put newPlanetData into line initialSlotNumber - 1 of planetsBySlot
  420.     --+Put "_< previous slot empty, InitialSlotNumber - 1 =[" & --+initialSlotNumber - 1 & "], newPlanetData=[" & --+newPlanetData & "]" after card field "test 0" -- test *****
  421.     return planetsBySlot
  422.     exit insertNewLessThanOld
  423.   end if
  424. end if
  425.  
  426. --  **********************************************************
  427. --  **  Previous slot full; is there an empty slot behind?  **
  428. --  **********************************************************
  429.  
  430. Put 0 into emptySlotNumber
  431. If (initialSlotNumber > lowestSlot + 1) and line initialSlotNumber - 1 of planetsbySlot is not empty then
  432.   Repeat with s = initialSlotNumber - 2 down to lowestSlot
  433.     If line s of planetsBySlot is empty then
  434.       Put s into emptySlotNumber
  435.       exit repeat
  436.     end if
  437.   end repeat
  438. end if
  439.  
  440. -- ****************************************************************
  441. -- **  Yes there is an empty slot behind, push planets backward  **
  442. -- **  and put newPlanetData into initialSlotNumber - 1          **
  443. -- ****************************************************************
  444.  
  445. If emptySlotNumber > 0 then
  446.   Repeat with s = emptySlotNumber+1 to initialSlotNumber - 1
  447.     Put line s of planetsBySlot into line s-1 of planetsBySlot
  448.   end repeat
  449.   Put newPlanetData into line initialSlotNumber -1 of planetsBySlot
  450.   return planetsBySlot
  451.   exit insertNewLessThanOld
  452. end if
  453.  
  454. --  ***************************************************************
  455. --  **  No empty slot behind, look ahead for empty slot  **********
  456. --  ***************************************************************
  457.  
  458. Put 0 into emptySlotNumber
  459. Repeat with s = initialSlotNumber+1 to highestSlot
  460.   If line s of planetsBySlot is empty then
  461.     Put s into emptySlotNumber
  462.     exit repeat
  463.   end if
  464. end repeat
  465.  
  466. --  ***************************************************************
  467. --  **  Yes there is an empty slot ahead, push planets forward  ***
  468. --  **  and put newPlanetData into initialSlotNumber **************
  469. --  ***************************************************************
  470.  
  471. If emptySlotNumber > 0 then
  472.   Repeat with s = emptySlotNumber-1 down to initialSlotNumber
  473.     Put line s of planetsBySlot into line s + 1 of planetsBySlot
  474.   end repeat
  475.   Put newPlanetData into line initialslotNumber of planetsBySlot
  476.   return planetsBySlot
  477.   exit insertNewLessThanOld
  478. end if
  479.  
  480. --  ****************************************************
  481. --  **  Sixth planet did not fit in house, put in     **
  482. --  **  line 61 of planetsBySlot                      **
  483. --  ****************************************************
  484.  
  485. Get convertSlotsToHouseAndSlot(initialslotNumber)
  486. Put item 1 of it into houseNumber
  487. Put newPlanetData && houseNumber into line 61 of planetsBySlot
  488. return planetsbySlot
  489. --
  490. end insertNewLessThanOld
  491.  
  492. --==================================================================
  493.  
  494. Function insertNewGreaterThanEqualOld newPlanetData,¬¨  -- planet_symbol,long,dd,sign_symbol,mm
  495. initialSlotNumber, lowestSlot,¬¨  -- within house 1..60
  496. highestSlot,¬¨  -- within house 1..60
  497. planetsBySlot -- variable with 60 lines
  498.  
  499. --  Returns planetsBySlot with new planet inserted and
  500. --  other planets rearranged if necessary
  501.  
  502. --  ************************************************************
  503. --  **  Is next slot empty, then put newPlanetData there *******
  504. --  ************************************************************
  505.  
  506. If (initialSlotNumber < highestSlot) then
  507.   if line initialSlotNumber + 1 of planetsbySlot is empty then
  508.     Put newPlanetData into line initialSlotNumber + 1 of planetsBySlot
  509.  
  510.     return planetsBySlot
  511.     exit insertNewGreaterThanEqualOld
  512.   end if
  513. end if
  514.  
  515. --  **********************************************************
  516. --  **  Next slot full; is there an empty slot ahead?  *******
  517. --  **********************************************************
  518.  
  519. Put 0 into emptySlotNumber
  520. If (initialSlotNumber < highestSlot - 1) and line initialSlotNumber + 1 of planetsBySlot is not empty then
  521.   Repeat with s = initialSlotNumber + 2 to highestSlot
  522.     If line s of planetsBySlot is empty then
  523.       Put s into emptySlotNumber
  524.       exit repeat
  525.     end if
  526.   end repeat
  527. end if
  528.  
  529. -- **************************************************************
  530. -- **  Yes there is an empty slot ahead, push planets forward  **
  531. -- **  and put newPlanetData into initialSlotNumber + 1 *********
  532. -- **************************************************************
  533.  
  534. If emptySlotNumber > 0 then
  535.   Repeat with s = emptySlotNumber - 1 down to initialSlotNumber + 1
  536.     Put line s of planetsBySlot into line s + 1 of planetsBySlot
  537.   end repeat
  538.   Put newPlanetData into line initialSlotNumber + 1 of planetsBySlot
  539.   return planetsBySlot
  540.   exit insertNewGreaterThanEqualOld
  541. end if
  542.  
  543. --  ***************************************************************
  544. --  **  No empty slot ahead, look behind for empty slot  **********
  545. --  ***************************************************************
  546.  
  547. Put 0 into emptySlotNumber
  548. Repeat with s = initialSlotNumber - 1 down to lowestSlot
  549.   If line s of planetsBySlot is empty then
  550.     Put s into emptySlotNumber
  551.     exit repeat
  552.   end if
  553. end repeat
  554.  
  555. --  ***************************************************************
  556. --  **  Yes there is an empty slot behind, push planets backward **
  557. --  **  and put newPlanetData into initialSlotNumber **************
  558. --  ***************************************************************
  559.  
  560. If emptySlotNumber > 0 then
  561.   Repeat with s = emptySlotNumber + 1 to initialSlotNumber
  562.     Put line s of planetsBySlot into line s - 1 of planetsBySlot
  563.   end repeat
  564.   Put newPlanetData into line initialslotNumber of planetsBySlot
  565.   return planetsBySlot
  566.   exit insertNewGreaterThanEqualOld
  567. end if
  568.  
  569. --  ****************************************************
  570. --  **  Sixth planet did not fit in house, put in     **
  571. --  **  line 61 of planetsBySlot                      **
  572. --  ****************************************************
  573.  
  574. Get convertSlotsToHouseAndSlot(initialslotNumber)
  575. Put item 1 of it into houseNumber
  576. Put newPlanetData && houseNumber into line 61 of planetsBySlot
  577. return planetsbySlot
  578. --
  579. end insertNewGreaterThanEqualOld
  580.  
  581. --===================================================================
  582.  
  583. Function Aspects planetStr
  584.  
  585. Put "¬°‚Ñ¢¬£¬¢‚àû¬ß¬∂‚Ä¢¬™¬∫‚Äì‚àö‚à´" into planetSymbols
  586. Put "¬©Œ©‚Ķ¬¨‚àÜÀö√¶‚âàÀô" into aspectSymbols
  587.  
  588. repeat with N = 2 to 13
  589.   do "Put empty into card field PlanetAspects" & N & " of card planets"
  590. end repeat
  591.  
  592. --  ******************************************************************
  593. --  **  enter planet symbols at the (horizontal) top of aspect grid **
  594. --  ******************************************************************
  595.  
  596. repeat with planetNumber = 2 to 13
  597.   do "Put PlanetAspects" & planetNumber & " into theField"
  598.   Put character planetNumber of planetSymbols into line 1 of card field theField
  599. end repeat
  600.  
  601. --  ********************************
  602. --  **  Declare aspects and orbs  **
  603. --  ********************************
  604.  
  605. Put 0 into aspect1  --  conjunction
  606. Put 6 into orb1
  607. --
  608. Put 30 into aspect2  --  semisextile
  609. Put 2 into orb2
  610. --
  611. Put 45 into aspect3  --  semisquare
  612. Put 2 into orb3
  613. --
  614. Put 60 into aspect4  --  sextile
  615. Put 4 into orb4
  616. --
  617. Put 90 into aspect5  --  square
  618. Put 6 into orb5
  619. --
  620. Put 120 into aspect6 -- trine
  621. Put 6 into orb6
  622. --
  623. Put 135 into aspect7 -- sequisquare
  624. Put 2 into orb7
  625. --
  626. Put 150 into aspect8 --  Quincunx
  627. Put 2 into orb8
  628. --
  629. Put 180 into aspect9 -- opposition
  630. Put 6 into orb9
  631. --
  632. --  **************************************************************
  633. --  **  Look at vertical planet "Pv" 1, then compare to EACH
  634. --  **  of the horizontal planets "Ph".  Continue with Pv 2..12
  635. --  **************************************************************
  636. --
  637. Repeat with pVnumber = 1 to 13
  638.   If pVnumber > 1
  639.   then Do "Put PlanetAspects" & pVnumber & " into mirrorField"
  640.   Put item 1 of (word pVNumber of planetStr) into Pv
  641.   --
  642.   Repeat with pHnumber = pVnumber + 1 to 13
  643.     do "Put PlanetAspects" & pHnumber & " into theField"
  644.     Put item 1 of (word pHNumber of planetStr) into Ph
  645.     --
  646.     Put abs(Pv-Ph) into delta
  647.     If delta > 180 then put 360 - delta into delta
  648.     put "≈∏" into line pVnumber + 1 of card field theField
  649.     If pVnumber > 1
  650.     then put "≈∏" into line pHnumber + 1 of card field mirrorField
  651.     --
  652.     Repeat with N =1 to 9
  653.       --
  654.       do "Put aspect" & N & " + orb" & N & " into high"
  655.       do "Put aspect" & N & " - orb" & N & " into low"
  656.       --
  657.       if delta <= low then
  658.         put empty into line pVNumber + 1 of card field theField
  659.         if pVNumber > 1
  660.         then put empty into line pHNumber + 1 of card field mirrorField
  661.         exit repeat  --  no aspect
  662.       end if
  663.       --
  664.       If (delta <= high) and (delta >= low) then
  665.         put character N of aspectSymbols into line pVNumber + 1 of card field theField
  666.         If pVnumber > 1
  667.         then put character N of aspectSymbols into line pHNumber + 1 of card field mirrorField
  668.         exit repeat  --  aspect found
  669.       end if
  670.       --
  671.     end repeat
  672.   end repeat
  673. end repeat
  674. end Aspects
  675.  
  676. --===================================================================
  677.  
  678. Function convertSlotsToHouseAndSlot slotNumber
  679.  
  680. If (slotNumber > 60) or (slotNumber < 0) then  -- Bad data trap
  681.   answer "Slot number is [" & slotNumber & "], should be ‚â• 1 or ‚⧠60"
  682.   exit convertSlotsToHouseAndSlot
  683. end if
  684.  
  685. If (slotNumber mod 5 is 0) then
  686.   Put slotNumber div 5 into houseNumber
  687.   Put 5 into slot
  688. else
  689.   Put (slotNumber div 5) + 1 into houseNumber
  690.   Put slotNumber - (houseNumber-1)*5 into slot
  691. end if
  692.  
  693. Return houseNumber & "," & slot
  694.  
  695. end convertSlotsToHouseAndSlot
  696.  
  697. --=============================================================
  698.  
  699. on alignFields  -- call this if you accidentally move the fields
  700.  
  701.   Put 287 into Yl
  702.   Put 79 into Yu
  703.   set the rectangle of card field "Planet Names" to 0,Yu ,81,Yl
  704.   set cursor to busy
  705.   set the rectangle of card field "Sign Names" to 81,Yu ,162,Yl
  706.   set cursor to busy
  707.   set the rectangle of card field "Planet Symbols" to 162,Yu,185,Yl
  708.   set cursor to busy
  709.   set the rectangle of card field "Planet DDsignMM" to 185,Yu,236,Yl
  710.   set the rectangle of card field "House" to 236,Yu,257,Yl
  711.   set cursor to busy
  712.   --
  713.   Put 21 into width
  714.   Put Yu - 15 into Yu
  715.   Repeat with f = 2 to 13
  716.     set cursor to busy
  717.     Put 236 + (f - 1) * width into Xu
  718.     Put Xu + width into Xl
  719.     do "set the rectangle of card field PlanetAspects" & f && "to Xu,Yu,Xl,Yl"
  720.   end repeat
  721.   --
  722. end alignFields
  723.  
  724. --==============================================================
  725.  
  726.  
  727.  
  728.  
  729.  
  730. -- part 1 (field)
  731. -- low flags: 01
  732. -- high flags: 4002
  733. -- rect: left=0 top=79 right=287 bottom=81
  734. -- title width / last selected line: 0
  735. -- icon id / first selected line: 0 / 0
  736. -- text alignment: 65535
  737. -- font id: 2
  738. -- text size: 12
  739. -- style flags: 256
  740. -- line height: 16
  741. -- part name: Planet Names
  742.  
  743.  
  744. -- part 3 (field)
  745. -- low flags: 01
  746. -- high flags: 4002
  747. -- rect: left=81 top=79 right=287 bottom=162
  748. -- title width / last selected line: 0
  749. -- icon id / first selected line: 0 / 0
  750. -- text alignment: 0
  751. -- font id: 3
  752. -- text size: 12
  753. -- style flags: 0
  754. -- line height: 16
  755. -- part name: Sign names
  756.  
  757.  
  758. -- part 4 (field)
  759. -- low flags: 01
  760. -- high flags: 4002
  761. -- rect: left=185 top=79 right=287 bottom=236
  762. -- title width / last selected line: 0
  763. -- icon id / first selected line: 0 / 0
  764. -- text alignment: 0
  765. -- font id: 250
  766. -- text size: 12
  767. -- style flags: 0
  768. -- line height: 16
  769. -- part name: Planet DDsignMM
  770.  
  771.  
  772. -- part 13 (button)
  773. -- low flags: 00
  774. -- high flags: A001
  775. -- rect: left=346 top=296 right=342 bottom=446
  776. -- title width / last selected line: 0
  777. -- icon id / first selected line: 902 / 902
  778. -- text alignment: 1
  779. -- font id: 0
  780. -- text size: 12
  781. -- style flags: 0
  782. -- line height: 16
  783. -- part name: Return to Data Entry
  784. ----- HyperTalk script -----
  785. on mouseUp
  786.   visual effect iris close very slowly
  787.   go to card "Data Entry"
  788. end mouseUp
  789.  
  790.  
  791.  
  792. -- part 15 (field)
  793. -- low flags: 01
  794. -- high flags: 4002
  795. -- rect: left=162 top=79 right=287 bottom=185
  796. -- title width / last selected line: 0
  797. -- icon id / first selected line: 0 / 0
  798. -- text alignment: 0
  799. -- font id: 250
  800. -- text size: 12
  801. -- style flags: 0
  802. -- line height: 16
  803. -- part name: Planet symbols
  804.  
  805.  
  806. -- part 17 (field)
  807. -- low flags: 01
  808. -- high flags: 4002
  809. -- rect: left=236 top=79 right=287 bottom=257
  810. -- title width / last selected line: 0
  811. -- icon id / first selected line: 0 / 0
  812. -- text alignment: 65535
  813. -- font id: 4
  814. -- text size: 12
  815. -- style flags: 0
  816. -- line height: 16
  817. -- part name: House
  818.  
  819.  
  820. -- part 18 (field)
  821. -- low flags: 01
  822. -- high flags: 4002
  823. -- rect: left=257 top=64 right=287 bottom=278
  824. -- title width / last selected line: 0
  825. -- icon id / first selected line: 0 / 0
  826. -- text alignment: 0
  827. -- font id: 250
  828. -- text size: 12
  829. -- style flags: 0
  830. -- line height: 16
  831. -- part name: PlanetAspects2
  832.  
  833.  
  834. -- part 19 (field)
  835. -- low flags: 01
  836. -- high flags: 4002
  837. -- rect: left=278 top=64 right=287 bottom=299
  838. -- title width / last selected line: 0
  839. -- icon id / first selected line: 0 / 0
  840. -- text alignment: 0
  841. -- font id: 250
  842. -- text size: 12
  843. -- style flags: 0
  844. -- line height: 16
  845. -- part name: PlanetAspects3
  846.  
  847.  
  848. -- part 20 (field)
  849. -- low flags: 01
  850. -- high flags: 4002
  851. -- rect: left=299 top=64 right=287 bottom=320
  852. -- title width / last selected line: 0
  853. -- icon id / first selected line: 0 / 0
  854. -- text alignment: 0
  855. -- font id: 250
  856. -- text size: 12
  857. -- style flags: 0
  858. -- line height: 16
  859. -- part name: PlanetAspects4
  860.  
  861.  
  862. -- part 21 (field)
  863. -- low flags: 01
  864. -- high flags: 4002
  865. -- rect: left=320 top=64 right=287 bottom=341
  866. -- title width / last selected line: 0
  867. -- icon id / first selected line: 0 / 0
  868. -- text alignment: 0
  869. -- font id: 250
  870. -- text size: 12
  871. -- style flags: 0
  872. -- line height: 16
  873. -- part name: PLanetAspects5
  874.  
  875.  
  876. -- part 22 (field)
  877. -- low flags: 01
  878. -- high flags: 4002
  879. -- rect: left=341 top=64 right=287 bottom=362
  880. -- title width / last selected line: 0
  881. -- icon id / first selected line: 0 / 0
  882. -- text alignment: 0
  883. -- font id: 250
  884. -- text size: 12
  885. -- style flags: 0
  886. -- line height: 16
  887. -- part name: PlanetAspects6
  888.  
  889.  
  890. -- part 23 (field)
  891. -- low flags: 01
  892. -- high flags: 4002
  893. -- rect: left=362 top=64 right=287 bottom=383
  894. -- title width / last selected line: 0
  895. -- icon id / first selected line: 0 / 0
  896. -- text alignment: 0
  897. -- font id: 250
  898. -- text size: 12
  899. -- style flags: 0
  900. -- line height: 16
  901. -- part name: PlanetAspects7
  902.  
  903.  
  904. -- part 24 (field)
  905. -- low flags: 01
  906. -- high flags: 4002
  907. -- rect: left=383 top=64 right=287 bottom=404
  908. -- title width / last selected line: 0
  909. -- icon id / first selected line: 0 / 0
  910. -- text alignment: 0
  911. -- font id: 250
  912. -- text size: 12
  913. -- style flags: 0
  914. -- line height: 16
  915. -- part name: PlanetAspects8
  916.  
  917.  
  918. -- part 25 (field)
  919. -- low flags: 01
  920. -- high flags: 4002
  921. -- rect: left=404 top=64 right=287 bottom=425
  922. -- title width / last selected line: 0
  923. -- icon id / first selected line: 0 / 0
  924. -- text alignment: 0
  925. -- font id: 250
  926. -- text size: 12
  927. -- style flags: 0
  928. -- line height: 16
  929. -- part name: PLanetAspects9
  930.  
  931.  
  932. -- part 26 (field)
  933. -- low flags: 01
  934. -- high flags: 4002
  935. -- rect: left=425 top=64 right=287 bottom=446
  936. -- title width / last selected line: 0
  937. -- icon id / first selected line: 0 / 0
  938. -- text alignment: 0
  939. -- font id: 250
  940. -- text size: 12
  941. -- style flags: 0
  942. -- line height: 16
  943. -- part name: PlanetAspects10
  944.  
  945.  
  946. -- part 27 (field)
  947. -- low flags: 01
  948. -- high flags: 4002
  949. -- rect: left=446 top=64 right=287 bottom=467
  950. -- title width / last selected line: 0
  951. -- icon id / first selected line: 0 / 0
  952. -- text alignment: 0
  953. -- font id: 250
  954. -- text size: 12
  955. -- style flags: 0
  956. -- line height: 16
  957. -- part name: PlanetAspects11
  958.  
  959.  
  960. -- part 28 (field)
  961. -- low flags: 01
  962. -- high flags: 4002
  963. -- rect: left=467 top=64 right=287 bottom=488
  964. -- title width / last selected line: 0
  965. -- icon id / first selected line: 0 / 0
  966. -- text alignment: 0
  967. -- font id: 250
  968. -- text size: 12
  969. -- style flags: 0
  970. -- line height: 16
  971. -- part name: PlanetAspects12
  972.  
  973.  
  974. -- part 29 (field)
  975. -- low flags: 01
  976. -- high flags: 4002
  977. -- rect: left=488 top=64 right=287 bottom=509
  978. -- title width / last selected line: 0
  979. -- icon id / first selected line: 0 / 0
  980. -- text alignment: 0
  981. -- font id: 250
  982. -- text size: 12
  983. -- style flags: 0
  984. -- line height: 16
  985. -- part name: PlanetAspects13
  986.  
  987.  
  988. -- part 38 (button)
  989. -- low flags: 00
  990. -- high flags: A001
  991. -- rect: left=464 top=296 right=342 bottom=512
  992. -- title width / last selected line: 0
  993. -- icon id / first selected line: 26425 / 26425
  994. -- text alignment: 1
  995. -- font id: 0
  996. -- text size: 12
  997. -- style flags: 0
  998. -- line height: 16
  999. -- part name: Horoscope
  1000. ----- HyperTalk script -----
  1001. on mouseUp
  1002.   visual effect wipe right very slowly
  1003.   Go to card "Horoscope"
  1004. end mouseUp
  1005.  
  1006.  
  1007.  
  1008. -- part contents for card part 1
  1009. ----- text -----
  1010. Moon
  1011. Sun
  1012. Mercury
  1013. Venus
  1014. Mars
  1015. Jupiter
  1016. Saturn
  1017. Uranus
  1018. Neptune
  1019. Pluto
  1020. True Node
  1021. Ascendant
  1022. Midheaven
  1023.  
  1024. -- part contents for card part 3
  1025. ----- text -----
  1026. Capricorn
  1027. Cancer
  1028. Cancer
  1029. Cancer
  1030. Leo
  1031. Leo
  1032. Cancer
  1033. Gemini
  1034. Libra
  1035. Leo
  1036. Cancer
  1037. Cancer
  1038. Aries
  1039.  
  1040. -- part contents for card part 15
  1041. ----- text -----
  1042. ¬°
  1043. ‚Ñ¢
  1044. £
  1045. ¢
  1046. ‚àû
  1047. §
  1048. ¶
  1049. •
  1050. ª
  1051. º
  1052. –
  1053. ‚àö
  1054. ‚à´
  1055.  
  1056. -- part contents for card part 4
  1057. ----- text -----
  1058. 17ß36
  1059. 14¥13
  1060. 20¥05
  1061. 16¥47
  1062. 26√∏33
  1063. 26√∏10
  1064. 02¥06
  1065. 11†01
  1066. 01“38
  1067. 07√∏38
  1068. 27¥40
  1069. 26¥17
  1070. 09‚àë53
  1071.  
  1072. -- part contents for card part 17
  1073. ----- text -----
  1074. 6
  1075. 12
  1076. 12
  1077. 12
  1078. 2
  1079. 2
  1080. 12
  1081. 11
  1082. 3
  1083. 1
  1084. 1
  1085.  
  1086. -- part contents for card part 18
  1087. ----- text -----
  1088. ‚Ñ¢
  1089. Àô
  1090.  
  1091. ©
  1092. ©
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101. ∆
  1102.  
  1103. -- part contents for card part 19
  1104. ----- text -----
  1105. £
  1106. Àô
  1107. ©
  1108.  
  1109. ©
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120. -- part contents for card part 20
  1121. ----- text -----
  1122. ¢
  1123. Àô
  1124. ©
  1125. ©
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137. -- part contents for card part 21
  1138. ----- text -----
  1139. ‚àû
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145. ©
  1146.  
  1147.  
  1148.  
  1149.  
  1150. Ω
  1151. Ω
  1152. æ
  1153.  
  1154. -- part contents for card part 22
  1155. ----- text -----
  1156. §
  1157.  
  1158.  
  1159.  
  1160.  
  1161. ©
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167. Ω
  1168. Ω
  1169. æ
  1170.  
  1171. -- part contents for card part 23
  1172. ----- text -----
  1173. ¶
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182. ∆
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188. -- part contents for card part 24
  1189. ----- text -----
  1190. •
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200. ¬
  1201. …
  1202. …
  1203. ¬
  1204.  
  1205. -- part contents for card part 25
  1206. ----- text -----
  1207. ª
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214. ∆
  1215.  
  1216.  
  1217.  
  1218. ¬
  1219.  
  1220.  
  1221.  
  1222. -- part contents for card part 26
  1223. ----- text -----
  1224. º
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232. ¬
  1233.  
  1234.  
  1235.  
  1236.  
  1237. Àö
  1238.  
  1239. -- part contents for card part 27
  1240. ----- text -----
  1241. –
  1242.  
  1243.  
  1244.  
  1245.  
  1246. Ω
  1247. Ω
  1248.  
  1249. …
  1250. ¬
  1251.  
  1252.  
  1253. ©
  1254.  
  1255.  
  1256. -- part contents for card part 28
  1257. ----- text -----
  1258. ‚àö
  1259.  
  1260.  
  1261.  
  1262.  
  1263. Ω
  1264. Ω
  1265.  
  1266. …
  1267.  
  1268.  
  1269. ©
  1270.  
  1271.  
  1272.  
  1273. -- part contents for card part 29
  1274. ----- text -----
  1275. ‚à´
  1276.  
  1277. ∆
  1278.  
  1279.  
  1280. æ
  1281. æ
  1282.  
  1283. ¬
  1284.  
  1285. Àö
  1286.  
  1287.